<!-- 角色管理 -->
<template>
    <div class="page-box h100 display-flex czbj">
      <div class="n-card-header__main pm10">
        角色管理
    </div>
        <div>
            <dxtable :headBtn="headBtn" :dataJson="dataJson" :portUrl="portUrl" :qx="qx" ref="databale"
               :formJson="formJson"></dxtable>
        </div>
    </div>
</template>
<script lang='ts' setup>
import dxtable from "../../../components/util/dxtable.vue";
import sort from "../../../components/util/sort.vue";
import { dxget, dxpost, qurl, hf } from "../../../util/index";
import { h, ref, reactive } from "vue";
const props = defineProps({
    pup: { type: String },
});

let headBtn = [];
const zdList = ref()
const databale = ref();
const initeer = () => {
    databale.value.initDataExpose();
};
const emit = defineEmits(["callBack"]);
// 弹窗公用该列表
let dataJson = reactive([

    {
        title: "角色ID",
        key: "id",
        width:80
    },
    {
        title: "角色名称",
        search: true, // 是否在搜索栏展示
        key: "role_name",
    },
    {
        title: "角色描述",
        key: "role_desc",
    },
    {
        title: "排序",
        width: 100,
        render(row) {
            row.databaseName = "mould_role";
            row.tb="mysql2"
            return h(sort, {
                row,
                onCallBack: () => {
                    initeer();
                },
            });
        },
    },
]);
let portUrl = "hhscdd/mould_role";
const qx = {
    DeletePermissionID: "hhroledel2", //删除
    EditPermissionIdentifier: "hhrolebj", // 编辑
    NewPermissionIdentifier: "hhrolexz", // 新建
    ViewPermissionID: "hhroleck", // 查看
};
let formJson = reactive([
    {
        title: "角色名称",
        key: "role_name",
        type:"input",
        required: true, 
    }, {
        title: "角色描述",
        key: "role_desc",
        type:"textarea",
        required: true, 
    },
])

</script>
  
  